package com.pignest.hotel.ui.reception;

import org.zkoss.zul.Menuitem;

import com.pignest.hotel.system.Logic;
import com.pignest.hotel.ui.room.RoomContextMenu;
import com.pignest.hotel.ui.room.RoomView;

public class ReceptionRoomContextMenu extends RoomContextMenu {

	private static final long serialVersionUID = -4061379469765426952L;

	@Override
	protected void onOpen(RoomView rv) {
		super.onOpen(rv);
		((Menuitem)getFellow("reception")).setDisabled(!Logic.canLiving(getRoom()));
		((Menuitem)getFellow("receptionCheckOut")).setDisabled(!Logic.canCheckOut(getRoom()));
		((Menuitem)getFellow("receptionItem")).setDisabled(!Logic.canCheckOut(getRoom()));
		((Menuitem)getFellow("receptionChange")).setDisabled(!Logic.canCheckOut(getRoom()));
		((Menuitem)getFellow("receptionMod")).setDisabled(!Logic.canCheckOut(getRoom()));
//		((Menuitem)getFellow("team")).setDisabled(!Logic.canLiving(getRoom()));
	}
}
